<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ include file="/WEB-INF/util_file/common.jspf"%>
<%@ include file="/WEB-INF/util_file/datepicker.jspf"%>

<style>
#admin_product {
	font: 9px/1.2 "돋움", dotum, bold;
}

th {
	background-color: #f1f1f1;
	font: 11px/1.2 "돋움", dotum, bold;
}

#login {
	width: 150px;
	height: 50px;
}

input {
	width: 200px;
}
.sub_menus {
	width: 150px;
	height: 30px;
}
</style>
<script type="text/javascript" src="/jeons/js/jquery.nyroModal.custom.js"></script>
<link rel="stylesheet" href="/jeons/css/nyroModal/nyroModal.css" type="text/css" media="screen" />
<script type="text/javascript">
$(document).ready(function(){
	
	
	
	//로그인
	$('#login').click( function(){
		if ($("#u_id").val().length == 0) {
			alert('아이디를 입력해주세요');
		}else if($("#userpassword").val().length == 0){
			alert('비밀번호를 입력해주세요');
		}else{
			var member = $("#member").serialize();
			$.ajax({
				type:'POST',
				url:'/jeons/member/login',
				data:member,
				success:function(data){
					if (data=="noid") {
						alert('아이디가 존재하지 않습니다.');
					}else if(data=="nopasswd"){
						alert('아이디와 패스워드가 일치하지 않습니다.');
					}else{
						alert('로그인에 성공하였습니다.');
						location.href = "/jeons/";
					} 
					
				}
			});
		}
	});
	
	//팝업
	$(".nm").nm({
		sizes : {
			minW : 400,
			maxW : 500,
			minH : 400,
			maxH : 400
		}
	});
	
	

	
});
</script>
<br>
<br>
<br>
<br>
<br>
<%-- <%=session.getId() %> --%>
주소 : ${_URI}
<div id="admin_product">
<center>
	<form:form commandName="member" id="member">
		<fieldset class="autotab ui-widget ui-widget-content ui-corner-all"> 
			<table border="0" width="650px" height="50">
				<tr>
					<td colspan="4" bgcolor="#fffff" height="1"></td>
				</tr>
				<tr>
					<th height="24" align="center"><b>아이디</b></th>
					<td colspan="2"><b>&nbsp;&nbsp;<input type="text" id="u_id" name="u_id"/></b></td>
					<th align="center" rowspan="3"><button type="button" id="login" class="bt"> <b>로그인<b></b></button></th>
					<td></td>
				</tr>
				<tr>
					<td colspan="3" bgcolor="#ffffff" height="1"></td>
				</tr>
				<tr>
					<th height="24" align="center"><b>비밀번호</b></th>
					<td colspan="2">&nbsp;&nbsp;<b><form:password
								path="userpassword" /></b></td>
				</tr>
				<tr>
					<td colspan="4" bgcolor="#fffff" height="1"></td>
				</tr>
				<tr>
					<th height="24" align="center"><button type="button" id="join_member"  class="sub_menus bt"><b>회원가입</b></button></th>
					<th height="24" align="center"><a href="/jeons/member/search_id" class="nm"><button type="button" id="search_id" class="sub_menus bt"><b>아이디 찾기</b></button></a></th>
					<th height="24" align="center" colspan="2"><a href="/jeons/member/search_pwd" class="nm"><button type="button" id="search_pwd" class="sub_menus bt"><b>비밀번호 찾기</b></button></a></th>
				</tr>
				<tr>
					<td colspan="4" bgcolor="#fffff" height="1"></td>
				</tr>
			</table>
		</fieldset> 
	</form:form>
</center>
</div>